package com.fyl.pattern.responsibility;

public class Client {
    public static void main(String[] args) {
        //请假条
        LeaveRequest leaveRequest = new LeaveRequest("小明", 6, "身体不适");

        //创建各级领导
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        //设置处理链
       groupLeader.setNextHandler(manager);
       manager.setNextHandler(generalManager);

       //处理请假条
        groupLeader.submit(leaveRequest);

    }
}
